package com.xuecheng.content.api;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author 冯佳鑫 又菜又爱学
 * @version 1.0
 * @DATE now()
 */
@RestController
public class FreemarkerController {
    @GetMapping("/testfreemarker")
    public ModelAndView test(){
        ModelAndView modelAndView = new ModelAndView();
        modelAndView.addObject("name","小明");
        //模板名称，后缀会自动补齐，因为nacos有去配置后缀
        modelAndView.setViewName("test");
        return modelAndView;
    }
}
